package com.cqhilink.iot.jobstandardmanagement.facade.utils;

/**
 * Created by YuPeng on 2016/11/30.
 * Ztree树图标枚举类
 */
public enum TreeIconSkin {

    ICON_ORG("-1", "org"),
    //分公司
    ICON_BUIDING("1", "building"),
    //气矿
    ICON_FLAG("2", "flag"),
    //部门
    ICON_DEPT("3", "department"),
    //作业区平台ico
    ICON_PLATFORM("4", "platform"),
    // 子系统
    ICON_SUBSYSTEM("5", "subsystem"),
    // ICON_CPLAT("5","cplat"),
    //角色
    ICON_ROLES("6", "roles"),
    //菜单
    ICON_MENU("7", "menu"),
    //作业区
    ICON_OA("8", "operating_area"),
    //场站
    ICON_STATION("9", "station"),
    //井
    IONC_WELL("22", "well"),
    //管线
    IONC_PIPELINE("23", "pipeline"),
    //设备
    ICON_DEVICE("10", "device"),
    //设备特性
    ICON_DEVICE_CHARA("11", "device_characteristics"),
    //生产实体/类型
    ICON_ENTITY("12", "production_entity"),
    // 业务节点
    ICON_SERVICE_NODE("13", "service_node"),
    // 生产单元ico
    ICON_PRODUCTION_UNIT("14", "production_unit"),
    //生产实体类型
    ICON_ENTITY_TYPE("15", "entity_type"),

    //实体类型特征ico
    ICON_ENTITY_CHARACTERISTICS("16", "entity_characteristics"),

    //生产实体ico
    ICON_PRODUCTION_ENTITY("17", "production_entity"),
    // 人员ico
    ICON_PEOPLE("18", "people"),

    //装置工艺区ico
    // device_process_area
    ICON_DEVICE_PROCESS_AREA("19", "d_p_area"),

    //系统ico
    ICON_SYSTEM_ICO("20", "system"),

    //装置工艺区下的设备ico
    ICON_D_P_DEVICE("21", "d_p_device"),

    //部件ico
    ICON_PARTS("22", "parts"),

    //工艺单元
    ICON_PROCESS_UNIT("22", "process_unit"),

    //物资综合
    ICON_MATERIALS_TOTAL("23", "materials_total"),

    //物资分类
    ICON_MATERIALS_CLASSIFY("24", "materials_classify"),

    //物资
    ICON_MATERIALS("25", "materials"),;

    private String code;

    private String desc;

    //构造方法
    TreeIconSkin(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }


    /**
     * 根据code 获取图标值
     *
     * @param code
     * @return
     */
    public static String getDes(String code) {
        for (TreeIconSkin iconSkin : TreeIconSkin.values()) {
            if (iconSkin.getCode().equals(code)) {
                return iconSkin.getDesc();
            }
        }
        return null;
    }
}
